//
//  MTPartyDetailAvatorCell.swift
//  MT
//
//  Created by ooops on 2020/5/26.
//  Copyright © 2020 张强. All rights reserved.
//

import UIKit

class MTPartyDetailAvatorCell: UICollectionViewCell {
    
    class func reuseIdentity() -> String {
        return "MTPartyDetailAvatorCellID"
    }
    
    lazy var avatorImageView: UIImageView = {
        let imageV = UIImageView()
        imageV.layer.cornerRadius = 22
        imageV.layer.masksToBounds = true
        return imageV
    }()
    
    func bindAvator(user: JMSGUser?) {
        self.avatorImageView.mtSetImage(user?.avatar, nil)
    }
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
        makeConstraint()
    }
    
    private func setupUI() {
        contentView.addSubview(avatorImageView)
    }
    
    private func makeConstraint() {
        avatorImageView.snp.makeConstraints { (make) in
            make.edges.equalToSuperview()
        }
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
}
